/*============================================================================*/
/*                                                                            */
/*  FILE       : ppf.h (Platform Parameter File)                              */
/*  CONTENTS   : Contains support functions for Platform Parameter Files      */
/*----------------------------------------------------------------------------*/
/*    $Archive:: /Software/mbapi/release/include/fileio/PPF.H                $*/
/*   $Revision:: 213                                                         $*/
/*----------------------------------------------------------------------------*/
/*  VISIBILITY : Public                                                       */
/*               Copyright (c) 1997 Motionbase PLC                            */
/*               All rights reserved.                                         */
/*----------------------------------------------------------------------------*/
/*  HISTORY    :                                                              */
/*                                                                            */
/*    Date     Author    Description                                          */
/*  03/12/97     KG      Created                                              */
/*  03/03/98     KG      Uses comp_def.h                                      */
/*  12/03/98     KG      TMDU and TActuator introduced to TPlatformParameters */
/*  19/05/99     KG      Added CCONV modifier to export functions from DLL.   */
/*============================================================================*/
#ifndef _PPF_H_
#define _PPF_H_

#ifdef __cplusplus
extern "C" {
#endif

/*============================================================================*/
/* INCLUDES                                                                   */
/*============================================================================*/
#include "comp_def.h"                  /* compilation switches, ...           */
#include "platform.h"                  /* TPlatformInfo, ...                  */

/*============================================================================*/
/* MACROS                                                                     */
/*============================================================================*/
#define cnSERIAL_NUMBER_LENGTH 80
/*============================================================================*/
/* TYPEDEFS                                                                   */
/*============================================================================*/
/*----------------------------------------------------------------------------*/
/* Enumerate error codes from this module                                     */
/*----------------------------------------------------------------------------*/
typedef enum {
  ppfSUCCESS = 0,
  ppfUNABLE_TO_OPEN_FILE,
  ppfBAD_FILE_FORMAT,
  ppfBAD_FORMAT_VERSION,
  ppfNULL_POINTER,
  ppfLAST_ERROR
} TPPFError;

/*============================================================================*/
/* FUNCTION PROTOTYPES                                                        */
/*============================================================================*/
/*----------------------------------------------------------------------------*/
/* readPlatformParameterFile                                                  */
/* Reads the contents of a Platform Parameter File into provided data         */
/* structure.                                                                 */
/*                                                                            */
/* Args:                                                                      */
/* filePath - full path to the Platform Parameter File                        */
/* expectedVersion - the file format version that this module expects to see  */
/* pPP      - pointer to Platform Parameter structure where data should be    */
/*            stored                                                          */
/*                                                                            */
/* Return:                                                                    */
/* ppfXXX enumeration                                                         */
/*----------------------------------------------------------------------------*/
CCONV TPPFError readPlatformParameterFile (CHAR* filePath,
                                           INT* expectedVersion,
                                           TPlatform* pPP);

/*----------------------------------------------------------------------------*/
/* ppfErrorMessage                                                            */
/* Returns an error message associated with a module error code               */
/*                                                                            */
/* Args:                                                                      */
/* error - the error code for which a message is required.                    */
/*                                                                            */
/* Return:                                                                    */
/* Pointer to a message string.                                               */
/*----------------------------------------------------------------------------*/
CCONV const CHAR* ppfErrorMessage (TPPFError error);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* _PPF_H_ */
/*============================================================================*/
/* END OF FILE                                                                */
/*============================================================================*/
